Skip to main content

How to modify the type and border of an interface element

For example purposes only, we will use an example SUIButton, however, you can apply this knowledge to other interface elements

⚠️ If you don't know how to create a new element, see more about creating an interface element ⚠️

Changing the type of borders

In your Java class, do the following:

public class YourClass extends Component {

// creates a new SImageType
public SImageType type; // select in Properties

// creates a new SUIButton, @AutoWired selects the component from this object
@AutoWired
private SUIButton button;

@Override
public void start() {

}

@Override
public void repeat() {

// changes the type of the border of the image of the SUIButton
button.setNormalImageType(type);
}
}

Changing the value and value type of edges

In your Java class, do the following:

public class YourClass extends Component {

// creates a new SUnitType
public SUnitType type; // select in Properties

// creates a new SUIButton, @AutoWired selects the component from this object
@AutoWired
private SUIButton button;

public void start() {

}

public void repeat() {

// changes the edges of the image of the SUIButton
button.setNormalBorder(8, type);
}
}